//Erstellt von Moritz Liepe
package main.editor;

import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IPersistableElement;

public class VOSEditorInput implements IEditorInput 
{

	private String id;
	
	public VOSEditorInput(String id)
	{
		super();
		this.id = id;
	}
	
	@SuppressWarnings("rawtypes")
	@Override
	public Object getAdapter(Class adapter) 
	{
		return null;
	}

	@Override
	public boolean exists() 
	{
		return false;
	}

	@Override
	public ImageDescriptor getImageDescriptor() 
	{
		return null;
	}

	@Override
	public String getName() 
	{
		return id;
	}

	@Override
	public IPersistableElement getPersistable() 
	{
		return null;
	}

	@Override
	public String getToolTipText() 
	{
		return "VOS Connection: " + this.id;
	}
	
	@Override
	public boolean equals(Object obj) 
	{
		if(!(obj instanceof VOSEditorInput))
		{
			return false;
		}
		return id.equals(((VOSEditorInput)obj).id);
	}

	@Override
	public int hashCode() 
	{
		return id.hashCode();
	}

}
